import { Callback } from './message-box.type';

import { ComponentPublicInstance, h, render, VNode } from 'vue'

const messageInstance = new Map<ComponentPublicInstance<{doClose:()=>void}>,{
  options:any,
  callback:Callback,
  resolve:(res:any)=>void,
  reject:(reason?:any)=>void
}>()

const initInstance = (props:any,container:HTMLElement)=>{
  const vnode = h(MessageBoxConstructor, props)
  render(vnode,container)
  document.body.appendChild(container.firstElementChild)
  return vnode.component
}


